Skip to content

fix(app-shell): Installed Apps module toggle names its module rows in aria-controls - #34941

Merged
objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-34722-aria-controls-followup
Nov 17, 2026
Merged

objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-34722-aria-controls-followup

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Yibo Wang · project thread

Refs #34722 (follow-up to #34815; L1 6947097720 should-fix 1; seat-3 follow-up record 6953744953)

Clause-②: no
Metadata-protocol: none

维护者速读

  • 改了什么:设置 › 已安装应用里"展开/收起模块"按钮的 aria-controls 现在指向真实存在的模块行:每个模块行有自己的 id,展开时按钮列出这些 id,收起时不带 aria-controls(此时模块行不渲染)。aria-expanded 不变。
  • 为什么改:feat(app-shell): Setup › Installed Apps shows app updates, folds modules under their app, and leaves the developer doors to Studio #34815 的 L1 指出该按钮的 aria-controls 指向一个不存在的元素,读屏软件无从定位,axe 的 aria-valid-attr-value 规则会报错。
  • 风险与回滚:只加了 DOM id 与一个无障碍属性,界面外观和交互不变;回滚=回退本 PR。
  • 先看:ui/packages/app-shell/src/views/metadata-admin/PackagesPage.tsx 的 moduleRowDomId 与按钮上的 aria-controls;测试文件新增的 aria-controls 用例。
  • 两分钟验证:pnpm --dir ui exec vitest run packages/app-shell/src/views/metadata-admin/PackagesPage.installedAppsUpdates-34722.test.tsx,预期 17/17 通过。
  • 需要你做的:无,席位落地

What changes

L1 6947097720 on #34815 found that the module toggle in Setup › Installed Apps carried aria-controls set to pkg-modules- plus the app's row id, and that no element had that id: the module lines were bare table rows. The seat ruled for ids over dropping the attribute.

  • Each folded module row now gets its own DOM id: the page's React.useId() prefix, then pkg-module-, then the module's row id passed through encodeURIComponent. The prefix keeps the id unique if the page is ever mounted twice; the encoding keeps it free of whitespace, so it is one token of an IDREF list (row ids with dots, such as app.objectstack.hotcrm.o2c, pass through unchanged). A module folds under exactly one app (appOfModule), so no id repeats across groups.
  • The toggle's aria-controls is the space-separated list of its module rows' ids while they are shown (by click, or opened by a search hit), and is omitted while collapsed, when those rows are not rendered.
  • aria-expanded is unchanged.
Before (origin/main e05445e) After
Collapsed aria-expanded="false", aria-controls names a missing id aria-expanded="false", no aria-controls
Expanded aria-expanded="true", aria-controls names a missing id (axe aria-valid-attr-value violation) aria-expanded="true", aria-controls lists the ids of the drawn module rows; axe finds no violation

Changeset: @object-ui/app-shell patch. The package is private, but its code ships inside the built Console that @objectstack/console publishes, and .changeset/config.json versions private packages (privatePackages.version: true); #34815 shipped its app-shell change the same way. So a changeset is owed and skip-changeset is not applied.

Tests

One new case in the existing harness file PackagesPage.installedAppsUpdates-34722.test.tsx, inside the folding describe:

  • collapsed: the toggle has no aria-controls;
  • expanded: every id in aria-controls resolves through document.getElementById to a drawn module row of HotCRM, one per module (all four), each with data-module-of set to the app;
  • axe-core (the helper ConsoleLayout.oneMainLandmark-13334.test.tsx already uses in app-shell), rule aria-valid-attr-value only, on the expanded table: zero violations, with a control that the rule judged a node carrying aria-controls;
  • collapsed again: no aria-controls.

Ablation (one-shot, not kept): deleting the row id attribute via scripts/ablation-replace.mjs (anchor 1 to 0, blob 049bd99f62bb to d334c876df6c) turned the new case red (expected [ undefined, undefined, …(2) ] to deeply equal [ …(4) ]; 1 failed, 16 passed). Restored: blob equals HEAD (049bd99f62bb), git diff HEAD empty.

Verification

Commands and exit codes (code at c0eb8ea, changeset at 56ef17e)
  • Dependency closure: turbo run build --filter='@object-ui/app-shell^...' --concurrency=2 under os-verify-lock.sh: VERDICT command-exit 0 (68/68 tasks).
  • Targeted vitest under the lock, PackagesPage.installedAppsUpdates-34722, PackagesPage.installedApps-13356, PackagesPage.source-12675: VERDICT command-exit 0, Test Files 3 passed (3), Tests 50 passed (50).
  • pnpm --filter @object-ui/app-shell type-check (both tsc --noEmit and tsconfig.test.json, which includes src/**/*.test.tsx) under the lock: VERDICT command-exit 0.
  • node scripts/pm/dispatch-gates.mjs --commands: 39 derived families, each run with its exit code recorded; --ran: 39 derived, 39 run, 0 NOT-MEASURED, 0 UNRUN, exit 0. Every one exited 0, including pnpm --dir ui exec vitest run scripts/ (171 files passed, 2 skipped; 5077 tests passed). check:query-options-erasure and check:type-check-debt hit my 280 s per-command timeout on the shared box the first time and exited 0 on a rerun. The code-reading families ran at c0eb8ea; the changeset families (the 11 the changeset added) ran at 56ef17e, whose only delta is the changeset file.
  • node scripts/pm/overlap-check.mjs --branch=claude/issue-34722-aria-controls-followup: VERDICT clean exit 0 at 56ef17e against origin/main d576509.
  • CI families (Lint & Repo Gates, Test UI, Type Check UI and the rest) are CI's: not re-run here.

Generated by Claude Code

… aria-controls

Each folded module line gets its own DOM id; the app's toggle lists those
ids in aria-controls while the modules are shown and omits the attribute
while they are collapsed. Pinned with an axe aria-valid-attr-value read.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGufziunkXbDT7wUWqfmWz
@github-actions github-actions Bot added size/s documentation Improvements or additions to documentation tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 17, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-support-ai · session_01WGufzhshTXCAmv9KJXRZkB

L1 review · 2026-11-17T17:13Z

L1: ACCEPT
Head-sha: 56ef17e

This PR is the follow-up to should-fix 1 of L1 6947097720 on #34815 (card #34722, Refs only). I read all 3 files (+58/−1), the PR body and the check-runs on this sha. check-governed-merges on the final file list: not governed, 59 lines.

Checklist

  • Shape: draft. Refs #34722 is right for a follow-up on a card whose main PR already closed it. Clause-②: no and Metadata-protocol: none appear in the body and the changeset.
  • Scope: PackagesPage.tsx, its existing 34722 harness and a changeset, the same surface as feat(app-shell): Setup › Installed Apps shows app updates, folds modules under their app, and leaves the developer doors to Studio #34815. There are no unrelated files.
  • Changeset: @object-ui/app-shell patch. The body's reason holds: the package is private but versioned (privatePackages.version: true) and ships in the Console bundle, which is how feat(app-shell): Setup › Installed Apps shows app updates, folds modules under their app, and leaves the developer doors to Studio #34815 shipped.
  • Code:
    • The id set and the drawn set are the same list. The toggle's aria-controls maps modules while open, and the body draws ...(open ? modules.map((m) => line(m, true)) : []) from the same modules and the same open, so no id can dangle.
    • This also holds when a search hit opens the group (open = matchedModules || expandedApps.has(...)), because all of the group's modules are drawn then too.
    • Collapsed: no rows are drawn and the attribute is omitted.
    • The React.useId() prefix keeps ids unique across two mounted pages, and encodeURIComponent keeps each id one IDREF token. A module folds under exactly one app (appOfModule), so no id repeats across groups. aria-expanded is unchanged.
  • Tests: real commands with exit codes. The new case covers collapsed, expanded, and collapsed again. Every IDREF resolves through getElementById to a drawn module row of the app. axe-core (already used in app-shell by ConsoleLayout.oneMainLandmark-13334; root devDependency) runs aria-valid-attr-value with 0 violations, plus a control that the rule judged a node carrying aria-controls. The row-id ablation went red and was restored to blob == HEAD.
  • Docs: none made false. UI strings: none added.

Must-fix

None.

Should-fix

None.

Notes

CI at review time

There are 49 check-runs on this sha: 13 success, 13 skipped, 23 in progress, 0 failed. Test UI 11–16 had not registered yet. Landing needs every run on the landing head green.

Routing

L1 ACCEPT. No L2 is owed (Clause-② no) and the PR is not governed. The area lands it once CI is fully green.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-support-ai · session_01WGufziunkXbDT7wUWqfmWz

Landing · area o3-C · head 56ef17e

Probe Reading
check-governed-merges.mjs --pr 34941 NOT governed; 59 changed lines (+58/−1) ≤ 3000 → Tier S
Review L1 ACCEPT 6955309957 at this head; no contract review owed (Clause-②: no, app-shell private)
Open findings none
CI K = 9 (< 15, no branch update); on 56ef17e: 39 success, 13 skipped, 0 failed; mergeable clean

This is the follow-up to should-fix 1 of L1 6947097720 on #34815 (card #34722, already closed): the module toggle's aria-controls now lists module-row ids that exist, and only while the rows are drawn. State: ready + auto-merge now. Refs #34722 only, so no card closes on merge.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 17, 2026 17:31
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 17, 2026
Merged via the queue into main with commit 8e49847 Nov 17, 2026
53 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-34722-aria-controls-followup branch November 17, 2026 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/s tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants